﻿#ifndef MEASURECOUNT_H
#define MEASURECOUNT_H

#include "MeasureElement.h"
namespace Qly {

class MeasureDataSet;

/**
 * @brief The MeasureCount class 计数类
 */
class MeasureCount : public MeasureElement
{
    friend MeasureDataSet;
public:
    MeasureCount(MeasureDataSet *parent = nullptr);
    QString name() Q_DECL_OVERRIDE {return u8"计数";}
private:
    void compute(void) Q_DECL_OVERRIDE; //计算图元的位置，还有长度结果
    void updateText(bool updatePosition = true) Q_DECL_OVERRIDE;
    int mouseLButtonPress(QPointF point_pix, QPointF point_um) Q_DECL_OVERRIDE;
    int mouseRButtonPress(QPointF point_pix, QPointF point_um) Q_DECL_OVERRIDE;
    DeleteResult tryDelete(QPointF p) Q_DECL_OVERRIDE;
    void paint( QPainter &painter ) Q_DECL_OVERRIDE; //画方法
};

}

#endif // MEASURECOUNT_H
